package com.platform.constants;

import cn.hutool.core.collection.CollUtil;
import com.platform.usercenter.domain.dto.SelectOptionDTO;
import org.aspectj.weaver.ast.Var;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.regex.Pattern;

public class SysUserConstants {

    /**
     * 密码校验强度
     */
    public static final String PW_PATTERN = "^(?![A-Za-z0-9]+$)(?![a-z0-9\\W]+$)(?![A-Za-z\\W]+$)(?![A-Z0-9\\W]+$)[a-zA-Z0-9\\W]{8,}$";

    /** 部门正常状态 */
    public static final String DEPT_NORMAL = "0";

    /** 部门停用状态 */
    public static final String DEPT_DISABLE = "1";

    /**
     * 轮班方式
     */
    public static final String CAL_SHIFT_TYPE_SINGLE="SINGLE";
    public static final String CAL_SHIFT_TYPE_TWO="SHIFT_TWO";
    public static final String CAL_SHIFT_TYPE_THREE="SHIFT_THREE";
    public static final String CAL_SHIFT_NAME_DAY="白班";
    public static final String CAL_SHIFT_NAME_NIGHT="夜班";
    public static final String CAL_SHIFT_NAME_MID="中班";
    public static final String CAL_SHIFT_METHOD_QUARTER="QUARTER";
    public static final String CAL_SHIFT_METHOD_MONTH="MONTH";
    public static final String CAL_SHIFT_METHOD_WEEK="WEEK";
    public static final String CAL_SHIFT_METHOD_DAY="DAY";

    /**
     * 排班日历的查询方式
     */
    public static final String CAL_QUERY_BY_TYPE="TYPE";
    public static final String CAL_QUERY_BY_TEAM="TEAM";
    public static final String CAL_QUERY_BY_USER="USER";


    /**
     * 节假日类型
     *
     */
    public static final String HOLIDAY_WORK="WORKDAY";
    public static final String HOLIDAY_FREE="HOLIDAY";

    /**
     * 单据的状态类型
     */
    public static final String ORDER_STATUS_PREPARE="PREPARE";
    public static final String ORDER_STATUS_CONFIRMED="CONFIRMED";
    public static final String ORDER_STATUS_APPROVING="APPROVING";
    public static final String ORDER_STATUS_APPROVED="APPROVED";
    public static final String ORDER_STATUS_FINISHED="FINISHED";

    /** 校验返回结果码 */
    public final static String UNIQUE = "0";
    public final static String NOT_UNIQUE = "1";


    public static final String WATCH_ONLINE= "WATCH_ONLINE";
    public static final String PC_ONLINE= "PC_ONLINE";
    public static final String APP_ONLINE= "APP_ONLINE";
    public static final String SPECTACLES_ONLINE = "SPECTACLES_ONLINE";
    public static final String WCHAT_ONLINE = "WCHAT_ONLINE";

    //用户中心个人二维码失效时间-字典类型
    public static final String CODE_LAPSE_TYPE = "sys_lapse_time";
    public static final String FROM_SOURCE = "platform-usercenter";
    public static final Long DEFAULT_LASPE_TIME = 1L;
    //数字转换
    public static HashMap<String,Integer> NUMBER_MAP=new HashMap<>(  );

    static {
        NUMBER_MAP.put( "一",1 );
        NUMBER_MAP.put( "二",2 );
        NUMBER_MAP.put( "三",3 );
        NUMBER_MAP.put( "四",4 );
        NUMBER_MAP.put( "五",5 );
        NUMBER_MAP.put( "六",6 );
        NUMBER_MAP.put( "七",7 );
        NUMBER_MAP.put( "八",8 );
        NUMBER_MAP.put( "九",9 );
        NUMBER_MAP.put( "十",10 );
    }

    public static final String N = "N";
    public static final String Y = "Y";
    /**
     * 组织关系 1 真实下级 2 业务关联下级
     */
    public static final String ORG_REAL = "1";
    public static final String ORG_BUSINESS = "2";
    /**
     *  树类型 1 组织 2部门 3岗位
     */
    public static final String TYPE_ORG = "1";
    public static final String TYPE_DEPT = "2";
    public static final String TYPE_POST = "3";
    /**
     * 默认父节点
     */
    public static final Long PARENT_0 = 0l;

    /**
     * 角色删除标记
     */
    public static final String ROLE_IS_DEL = "2";
    public static final String ROLE_NOT_DEL = "0";

    /**
     *角色类型 0-普通角色 1-超级管理员 2-分级管理员
     */
    public static final String ROLE_FLAG_0 = "0";
    public static final String ROLE_FLAG_1 = "1";
    public static final String ROLE_FLAG_2 = "2";
    /**
     *菜单类型  M目录 C菜单 F按钮
     */
    public static final String MENU_TYPE_M = "M";
    public static final String MENU_TYPE_C = "C";
    public static final String MENU_TYPE_F = "F";
    public static final List<SelectOptionDTO> GUEST_AIRPORT_LIST = new ArrayList<>();

    static {
        GUEST_AIRPORT_LIST.add(new SelectOptionDTO("桂林","KWL"));
        GUEST_AIRPORT_LIST.add(new SelectOptionDTO("北海","BHY"));
        GUEST_AIRPORT_LIST.add(new SelectOptionDTO("玉林","YLX"));
        GUEST_AIRPORT_LIST.add(new SelectOptionDTO("南宁","NNG"));
        GUEST_AIRPORT_LIST.add(new SelectOptionDTO("柳州","LZH"));
        GUEST_AIRPORT_LIST.add(new SelectOptionDTO("梧州","WUZ"));
        GUEST_AIRPORT_LIST.add(new SelectOptionDTO("河池","HCJ"));
        GUEST_AIRPORT_LIST.add(new SelectOptionDTO("百色","AEB"));
    }

}
